package com.thb.pay.api.payment;


import com.thb.pay.api.payment.fallback.PayProductServiceApiFallbackFactory;
import com.thb.pay.api.payment.vo.req.PayProductTypePageReq;
import com.thb.pay.api.payment.vo.req.PayProductTypeReq;
import com.thb.pay.api.payment.vo.resp.PayProductTypeVo;
import com.thb.pay.core.utils.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 支付-产品类型表 前端控制器
 * </p>
 *
 * @author lucky
 * @since 2019-10-15
 */
@FeignClient(value = "pay-service", fallbackFactory = PayProductServiceApiFallbackFactory.class)
@RequestMapping("/payProductTypeApi")
public interface PayProductTypeServiceApi {

    @RequestMapping(value = "/findPage", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    PageResult<PayProductTypeVo> findPage(@RequestBody PayProductTypePageReq pageReq);

    @RequestMapping(value = "/findAllList", method = RequestMethod.GET)
    List<PayProductTypeVo> findAllList();


    @RequestMapping(value = "/findListByIds", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    List<PayProductTypeVo> findListByIds(@RequestBody List<Long> ids);

    @RequestMapping(value = "/getById", method = RequestMethod.GET)
    PayProductTypeVo getById(@RequestParam("id") Long id);

    @RequestMapping(value = "/add", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void add(@RequestBody PayProductTypeReq payProductTypeReq);

    @RequestMapping(value = "/update", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void update(@RequestBody PayProductTypeReq payProductTypeReq);

    @RequestMapping(value = "/deleteBatchIds", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void deleteBatchIds(@RequestBody List<Long> ids);
}
